package org.epam.szhuk.greenway.model;

import java.io.Serializable;

import android.os.Parcel;
import android.os.Parcelable;

public class StoredGeoPoint implements Serializable{

	private static final long serialVersionUID = 1L;
	
	public final static int POINT_TYPE_USUAL=0;
	public final static int POINT_TYPE_EMPTY=1; //to mark displacement in type, e.g., if with GPS coords was created after 5 sec after video began been recording
	public final static int POINT_TYPE_APPROXIMATED=2; // if coord was approximated - e.g. , 3 sec time between two points in file => create 3 points to cover that time space 
	public final static int MODE_GPS=1;
	public final static int MODE_FINE=2;

	/**
	 * 
	 * @param lat
	 * @param lon
	 * @param time
	 * @param speed
	 * @param type
	 */
	public StoredGeoPoint(int lat, int lon, long time, float speed, int type) {
		super();
		this.lat = lat;
		this.lon = lon;
		this.time = time;
		this.speed=speed;
		this.type=type;
	}

	private int lat;
	private int lon;
	private long time;
	private float speed;
	private int type;
	
	public int getPointType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getLat() {
		return lat;
	}
	
	public void setLat(int lat) {
		this.lat = lat;
	}
	
	public int getLon() {
		return lon;
	}
	
	public void setLon(int lon) {
		this.lon = lon;
	}
	
	/**
	 * Time stored in ms since 1970
	 * @param time
	 */	
	public long getTime() {
		return time;
	}
	
	/**
	 * Time stored in ms since 1970
	 * @param time
	 */
	public void setTime(long time) {
		this.time = time;
	}

	public float getSpeed() {
		return speed;
	}

	public void setSpeed(float speed) {
		this.speed = speed;
	}

	@Override
	public String toString() {
		return "StoredGeoPoint [lat=" + lat + ", lon=" + lon + ", time=" + time
				+ ", speed=" + speed + ", type=" + type + "]";
	}


}
